<?xml version="1.0" encoding="UTF-8"?>
<html filename="docs/SAX/IAttributeList.html">
<body>
<a id="#top"/>
<h1>
	                Interface Summary : IAttributeList </h1> Deprecated SAX 1 Interfaces
 Interface for an element's attribute specifications.

 <blockquote>
 <em>This module, both source code and documentation, is in the
 Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
 </blockquote>

 <p>This is the original SAX1 interface for reporting an element's
 attributes.  Unlike the new <a href="../SAX/IAttributes.html">IAttributes</a>
 interface, it does not support Namespace-related information.</p>

 <p>When an attribute list is supplied as part of a
 <a href="../SAX/IDocumentHandler.html#startElement">startElement</a>
 event, the list will return valid results only during the
 scope of the event; once the event handler returns control
 to the parser, the attribute list is invalid.</p>

 <p>An attribute list includes only attributes that have been
 specified or defaulted: #IMPLIED attributes will not be included.</p>

 <p>There are two ways for the SAX application to obtain information
 from the Attribute List.  First, it can iterate through the entire
 list:</p>

 <pre>
 procedure TMyDocumentHandler.startElement(const name: SAXString;
   const atts: IAttributeList);
 var i : Integer;
     attName : SAXString;
     attType : SAXString;
     attValue : SAXString;
 begin
   for i:= 0 to atts.getLength()-1 do
   begin
     attName:= atts.getName(i);
     attType:= atts.getType(i);
     attValue:= atts.getValue(i);
     [...]
   end;
 end;
 </pre>

 <p>(Note that the result of getLength() will be zero if there
 are no attributes.)</p>

 <p>As an alternative, the application can request the value or
 type of specific attributes:</p>

 <pre>
 procedure TMyDocumentHandler.startElement(const name: SAXString;
   const atts: IAttributeList);
 var attId : SAXString;
     attLabel : SAXString;
 begin
   attId:= atts.getValue('id');
   attLabel:= atts.getValue('label');
   [...]
 end;
 </pre>

<br/><b>Deprecated : </b> This interface has been replaced by the SAX2
             <a href="../SAX/IAttributes.html">IAttributes</a>
             interface, which includes Namespace support.
<br/><b>Since : </b> SAX 1.0
<br/><b>See : </b> <a href="../SAX/IDocumentHandler.html#startElement">IDocumentHandler.startElement</a>
<h2>
	              Methods
	            </h2>
<div style="padding-left:10px">
<a href="#getLength">
	                  function
	                 getLength() : Integer</a>
<br/>
<a href="#getName">
	                  function
	                 getName(Integer) : SAXString</a>
<br/>
<a href="#getType">
	                  function
	                 getType(Integer) : SAXString</a>
<br/>
<a href="#getType">
	                  function
	                 getType(SAXString) : SAXString</a>
<br/>
<a href="#getValue">
	                  function
	                 getValue(Integer) : SAXString</a>
<br/>
<a href="#getValue">
	                  function
	                 getValue(SAXString) : SAXString</a>
<br/>
</div>
<br/>
<hr width="100%"/>
<a name="#getLength">
<p>
<b>function</b> getLength() : Integer; </p>
</a> Return the number of attributes in this list.

 <p>The SAX parser may provide attributes in any
 arbitrary order, regardless of the order in which they were
 declared or specified.  The number of attributes may be
 zero.</p>

<br/><b>Result : </b> The number of attributes in the list.
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getName">
<p>
<b>function</b> getName( i : Integer) : SAXString; </p>
</a> Return the name of an attribute in this list (by position).

 <p>The names must be unique: the SAX parser shall not include the
 same attribute twice.  Attributes without values (those declared
 #IMPLIED without a value specified in the start tag) will be
 omitted from the list.</p>

 <p>If the attribute name has a namespace prefix, the prefix
 will still be attached.</p>

<br/><b>Parameter : </b> i The index of the attribute in the list (starting at 0).
<br/><b>Result : </b> The name of the indexed attribute, or an empty string
         if the index is out of range.
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getLength">IAttributeList.getLength</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getType">
<p>
<b>function</b> getType( i : Integer) : SAXString; </p>
</a> Return the type of an attribute in the list (by position).

 <p>The attribute type is one of the strings 'CDATA', 'ID',
 'IDREF', 'IDREFS', 'NMTOKEN', 'NMTOKENS', 'ENTITY', 'ENTITIES',
 or 'NOTATION' (always in upper case).</p>

 <p>If the parser has not read a declaration for the attribute,
 or if the parser does not report attribute types, then it must
 return the value 'CDATA' as stated in the XML 1.0 Recommentation
 (clause 3.3.3, &quot;Attribute-Value Normalization&quot;).</p>

 <p>For an enumerated attribute that is not a notation, the
 parser will report the type as 'NMTOKEN'.</p>

<br/><b>Parameter : </b> i The index of the attribute in the list (starting at 0).
<br/><b>Result : </b> The attribute type as a string, or
         an empty string if the index is out of range.
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getLength">IAttributeList.getLength</a>
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getType.SAXString">IAttributeList.getType(SAXString)</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getType">
<p>
<b>function</b> getType(<b>const</b> name : SAXString) : SAXString; </p>
</a> Return the value of an attribute in the list (by position).

 <p>If the attribute value is a list of tokens (IDREFS,
 ENTITIES, or NMTOKENS), the tokens will be concatenated
 into a single string separated by whitespace.</p>

<br/><b>Parameter : </b> i The index of the attribute in the list (starting at 0).
<br/><b>Result : </b> The attribute value as a string, or
         an empty string if the index is out of range.
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getLength">IAttributeList.getLength</a>
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getValue.SAXString">IAttributeList.getValue(SAXString)</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getValue">
<p>
<b>function</b> getValue( i : Integer) : SAXString; </p>
</a> Return the type of an attribute in the list (by name).

 <p>The return value is the same as the return value for
 getType(Integer).</p>

 <p>If the attribute name has a namespace prefix in the document,
 the application must include the prefix here.</p>

<br/><b>Parameter : </b> name The name of the attribute.
<br/><b>Result : </b> The attribute type as a string, or an empty string if no
         such attribute exists.
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getType.Integer">IAttributeList.getType(Integer)</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getValue">
<p>
<b>function</b> getValue(<b>const</b> name : SAXString) : SAXString; </p>
</a> Return the value of an attribute in the list (by name).

 <p>The return value is the same as the return value for
 getValue(Integer).</p>

 <p>If the attribute name has a namespace prefix in the document,
 the application must include the prefix here.</p>

<br/><b>Parameter : </b> i The index of the attribute in the list.
<br/><b>Result : </b> The attribute value as a string, or an empty string if
         no such attribute exists.
<br/><b>See : </b> <a href="../SAX/IAttributeList.html#getValue.Integer">IAttributeList.getValue(Integer)</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
</body>
</html>